export const ji_neng = class ji_neng { //技能
	constructor(name, wei_li) {
		this.name = name
		this.wei_li = wei_li
	}
}
export const shu_xin = class shu_xin { //属性
	constructor(ti_li, gong_ji, fang_yu, te_gong, te_fang, su_du) {
		this.ti_li = ti_li
		this.gong_ji = gong_ji
		this.fang_yu = fang_yu
		this.te_gong = te_gong
		this.te_fang = te_fang
		this.su_du = su_du
	}
}
export const zhong_zu = class zhong_zu { //种族
	constructor(ti_li, gong_ji, fang_yu, te_gong, te_fang, su_du) {
		this.ti_li = ti_li
		this.gong_ji = gong_ji
		this.fang_yu = fang_yu
		this.te_gong = te_gong
		this.te_fang = te_fang
		this.su_du = su_du
	}
}
export const nu_li = class nu_li { //努力
	constructor(ti_li, gong_ji, fang_yu, te_gong, te_fang, su_du) {
		this.ti_li = ti_li
		this.gong_ji = gong_ji
		this.fang_yu = fang_yu
		this.te_gong = te_gong
		this.te_fang = te_fang
		this.su_du = su_du
	}
}
export const player = class player { //玩家  //传递两个参数  一个当前精灵   一个精灵列表
	constructor(now_jing_ling, jing_ling_list) {
		this.now_jing_ling = now_jing_ling
		this.jing_ling_list = jing_ling_list
		this.sum_health = jing_ling_list[0].shu_xing_zhi.ti_li +
			jing_ling_list[1].shu_xing_zhi.ti_li +
			jing_ling_list[2].shu_xing_zhi.ti_li +
			jing_ling_list[3].shu_xing_zhi.ti_li +
			jing_ling_list[4].shu_xing_zhi.ti_li +
			jing_ling_list[5].shu_xing_zhi.ti_li;
	}
}


export const jin_lin = class jin_lin { //精灵
	constructor(name, level, ge_ti, shu_xing_zhi, zhong_zu_zhi, nu_li_zhi, xing_ge, ji_neng_1, ji_neng_2, ji_neng_3,ji_neng_4) {
		this.name = name
		this.level = level
		this.ge_ti = ge_ti
		this.shu_xing_zhi = new shu_xin(...shu_xing_zhi)
		this.zhong_zu_zhi = new zhong_zu(...zhong_zu_zhi) 
		this.nu_li_zhi = new nu_li(...nu_li_zhi)
		this.xing_ge = xing_ge
		this.ji_neng_1 = new ji_neng(...ji_neng_1)
		this.ji_neng_2 = new ji_neng(...ji_neng_2)
		this.ji_neng_3 = new ji_neng(...ji_neng_3)
		this.ji_neng_4 = new ji_neng(...ji_neng_4)
	}
}



//属性计算公式   
//血量不分性格均为1 结果+ level + 10
//性格提升 [ 0.9, 1, 1.1]   所得值向下取整为属性值
// ((种族值*2+努力值/4+个体)*(等级/100) +5) * 性格提升    其中种族值为固定不变决定精灵上限   努力值可以通过战斗获得 每个上限255上限总和510  个体上限31

// 类似特防/攻击/防御/特攻/速度/体力 +1或者-1    取+50%或者-50%  上限+6